package org.example.demo1;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class HelloController {
    @PostMapping("/hello")
    public List hello() {
        List list = new ArrayList();
        list.add("hello");
        return list;
    }

    @GetMapping("/hi")
    public Object hi() {
        return "hi";
    }
}
